#include "Game.h"
#include "FullScreenActor.h"

#include <GL/freeglut.h>

FullScreenActor::FullScreenActor(ID idActor, string & textura):Actor(idActor,Actores::OBJETO)
	{
	t = static_cast<Textura*>(g->getRecursos()->getResource(textura,RECURSOS::TEXTURA));
	}
void FullScreenActor::render(){
	glPushMatrix();
	glLoadIdentity();
	t->bind();

	glBegin(GL_QUADS);
		glTexCoord2f(0.f,1.f);
		glVertex2f(0.f,0.f);

		glTexCoord2f(1.f,1.f);
		glVertex2f(g->getAnchoPantalla(),0.f);


		glTexCoord2f(1.f,0.f);
		glVertex2f(g->getAnchoPantalla(),g->getAltoPantalla());

		glTexCoord2f(0.f,0.f);
		glVertex2f(0.f,g->getAltoPantalla());

	glEnd();
	glPopMatrix();

}
void FullScreenActor::update(float speedFactor){

}

FullScreenActor::~FullScreenActor(void)
	{
	}
